﻿<!DOCTYPE html>
<html>
	<head>
		
	</head>
	<body>
		<script type=text/javascript>
		var sendForm = function()
            {
				var OSI = document.getElementById("OS").selectedIndex;
				//takes the index (OSI) and works out which browser it is using
				switch (OSI)
				{
                    case 1:
					var OS = "Windows XP";
					break;
					
					case 2:
					var OS = "Windows Vista";
					break;
					
					case 3:
					var OS = "Windows 7";
					break;
					
					case 4:
					var OS = "Mac OS X";
					break;
					
					case 5:
					var OS = "Android Tablet";
					break;
					
					case 6:
					var OS = "Chrome OS";
					break;
					
					default:
					var OS = "";
				}
				var FFVer = document.getElementById("ffverno").value;
				var Browser = document.getElementById("browser").value;
				var Repro = document.getElementById("reprosteps").value;
				var Expect = document.getElementById("expected").value;
				var Actual = document.getElementById("actual").value;
				var Critical = document.getElementById("critical").checked
				if (Critical == true)
				{
					var pri = "High"
				}
				else
				{
					var pri = "Medium"
				}
				console.log(OS + FFVer + Browser + Repro + Expect + Actual)
				location.href = "http://code.google.com/p/freedom-fighters-online/issues/entry?template=Bug%20Report&comment=OS:%20" + OS + "%0AGame%20Version:%20" + FFVer + "%0ABrowser:%20" + Browser + "%0A%0AReproduction%20Steps:%20" + Repro + "%0AExpected%20Action:%20" + Expect + "%0AActual%20Results:%20" + Actual + "&labels=OS-" + OS + ",Priority-" + pri;
			};
		</script>
		<form id=bugreport>
			<label>What operating System are you running?</label>
			<select id="OS">
				<option selected=selected disabled=disabled>Choose one...</option>
				<option case=0>Windows XP</option>
				<option case=1>Windows Vista</option>
				<option case=2>Windows 7</option>
				<option case=3>Mac OS X</option>
				<option case=4>Android Tablet</option>
				<option case=5>Chrome OS</option>
			</select> <br />
			<label>What version of FF are you using to make the bug happen?</label>
			<input type=text value=aa.bb.cc.d id=ffverno /><br />
			<label>What browser do you run?</label>
			<input type=text id="browser"/> <br />
			<label>How did you make the bug happen?</label> <br />
			<textarea rows="7" cols="50" id="reprosteps">
1. 
2. 
3. 
</textarea><br />
			<!--if I did that with the tabs in, it would put the tabs into the textarea itself-->
			<label>What should happen?</label> <br />
			<textarea rows="3" cols="50" id=expected></textarea><br />
			<label>What happened instead?</label> <br />
			<textarea rows="3" cols="50" id=actual></textarea><br />
			<input type=checkbox id=critical />I believe this could be critical! (Sent to bottom of pile if misused)<br />
			<input type=button onclick=sendForm() value=Submit />
		</form>
	</body>
</html>